{include inc/top.html}
<div class="index-main">
    <h1 class="h-title">{$atitle}
        <span class="sub-nav">
            <a href="{url:'admin@cat-add-ctype-%d' , $ctype}">新增类别</a>
        </span>
    </h1>
    <table class="table">
        <tr>
            <th class="th" width="25%">名称</th>
            <th class="th" width="25%">映射</th>
            <th class="th" width="15%">排序</th>
            <th class="th" >操作</th>
        </tr>
        {foreach $list $k $v}
        <tr class="top_{$v['top']} tr tr-{$list_index % 2 === 0 ? '2' : '1'}">
            <td class="td" >
                {if $v['parent']}
                    {:str_repeat('&nbsp;&nbsp;&nbsp;' , substr_count($v['path'] , '#') - 3)}
                    <span style="font-size:12px">└</span>&nbsp;
                    <a href="javascript:void(0);" class="cat-level-{:substr_count($v['path'] , '#')}" propid="{$v['id']}" id="cat-{$v['id']}">{$v['name']}</a>
                {else}
                    <a href="javascript:void(0);" class="cat-level-{:substr_count($v['path'] , '#')}" propid="{$v['id']}" id="cat-{$v['id']}">{$v['name']}</a>
                {/if}
            </td>
            <td class="td">/{$v['sname']}</td>
            <td class="td">
                <input type="text" class="ajaxsave intval input short" default="{$v['sort']}" maxlength="4" ajaxurl="{url:'admin@cat-sort-id-%d-v-|false' , $v['id']}" value="{$v['sort']}" /></td>
            <td class="td">
                <a href="{url:'admin@cat-add-id-%d' , $v['id']}">修改</a> |
                <a href="{url:'admin@cat-del-id-%d' , $v['id']}" class="delbtn">删除</a>
            </td>
        </tr>
        {/foreach}
    </table>
    <div class="clear"></div>
</div>
{include inc/bottom.html}